<nz-spin [nzSpinning]="isSpinning" [nzTip]="'正在初始化模块信息...'">
  <section class="in-index">
    <div class="table-operations" style="margin: 16px 0;padding: 0 2%">
      <button style="background: #ef4954;color: #fff;" nz-button (click)="classadd('add')">
        <i class="anticon anticon-plus"></i>
        <span>新增</span>
      </button>
      <button nz-button [disabled]="!allChecked && !indeterminate " (click)="delestudent()">
        <i class="anticon anticon-close-circle-o"></i>
        <span>删除</span>
      </button>
      <button nz-button (click)="getEntityList()" [nzLoading]="loadingData">
        <i class="anticon anticon-reload"></i>
        <span>刷新</span>
      </button>
    </div>
    <app-search-bar-widget (searchEvent)='searchBar($event)' [searchTextFieldName]='"className"'></app-search-bar-widget>
    <nz-table [nzLoading]="loadingData" [nzFrontPagination]="false" [nzTotal]="listEntities.recordTotalCount" [(nzPageIndex)]="listEntities.currentPageIndex"
      (nzPageIndexChange)="getEntityListAsync(true)" [(nzPageSize)]="listEntities.pageSize" #nzTable #nzFixedHeader nzBordered
      #rowSelectionTable [nzData]="listEntities.entities" (nzCurrentPageDataChange)="currentPageDataChange($event)">
      <thead nz-thead>
        <tr>
          <th nzShowCheckbox [(nzChecked)]="allChecked" [nzIndeterminate]="indeterminate" (nzCheckedChange)="checkAll($event)" style="width: 60px;">
          </th>
          <th style="text-align: center;">
            <span>院系名字</span>
          </th>
          <th style="text-align: center;">
            <span>班级名字</span>
          </th>
          <th style="text-align: center;">
            <span>班级人数</span>
          </th>
          <th style="text-align: center;">
            <span>实训课程</span>
          </th>
          <th nz-th style="text-align: center;">操作</th>
        </tr>
      </thead>
      <tbody nz-tbody style="text-align: center;">
        <tr nz-tbody-tr *ngFor="let data of rowSelectionTable.data;let i=index;">
          <td nzShowCheckbox [(nzChecked)]="data.checked" (nzCheckedChange)="refreshStatus1(data.id,$event)"></td>
          <td nz-td>
            <span>{{data.collegeDepartmentName}}</span>
          </td>
          <td nz-td>
            <span>{{data.className}}</span>
          </td>
          <td nz-td>
            <span>{{data.studentCount}}</span>
          </td>
          <td class="project" nz-td>
            <span *ngFor="let pro of data.project;let j=index;">{{pro.projectName}}</span>
          </td>
          <td nz-td>
            <a (click)="studentmanage(data.id)">
              <i class="anticon anticon-edit"></i>学生管理</a>
            <a (click)="editor(data.id)">
              <i class="anticon anticon-edit"></i>编辑</a>
          </td>
        </tr>
      </tbody>
    </nz-table>
    <nz-modal [(nzVisible)]="smisVisible" nzTitle="确定要删除吗？" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOksm('success')">
      <p>已选中{{checkedNumber}}条</p>
    </nz-modal>
    <div *ngIf="studentmana" style="position: fixed;top: 0;left: 0;bottom: 0;right: 0;background: rgba(0,0,0,0.6);z-index: 99;">
      <div style="box-sizing:border-box;width: 66%;;max-height: 70%;margin: auto;background: #fff;position: relative;overflow-y: auto;margin-top:80px;padding-bottom:70px;">
        <span (click)="removescs()" style="position:absolute;top: 6px;right: 6px;font-size: 16px;cursor: pointer;">
          <i class="anticon anticon-close-circle-o"></i>
        </span>
        <div style="text-align: left;padding-top:30px;margin: 30px;background: #EF4954;padding: 5px 10px;color: #fff;font-size: 16px;width: 88px; ">
          班级成员
        </div>
        <div style="display: flex;flex-wrap:wrap;width: 80%;margin:0 auto;">
          <div *ngFor="let studentarr of allstudentdata;let i=index" style="background: #F7F7F7;text-align: center;padding: 10px 14px;border: 1px solid #D7D7D7;margin:10px;position: relative;min-width: 100px;overflow: hidden;">
            <span style="color: #191818;font-size: 18px;">{{studentarr.personName}}</span>
            <nz-popconfirm [nzTitle]="'确定要删除信息吗？'" (nzOnConfirm)="dstydent(studentarr.id,studentarr.personName)">
              <a nz-popconfirm>
                <div title="移除" style="cursor: pointer;background: #C00000;color: #fff;width: 40px;height: 40px;position: absolute;top:-20px;right: -20px;
                    transform:rotate(45deg);
                    -ms-transform:rotate(45deg); 	/* IE 9 */
                    -moz-transform:rotate(45deg); 	/* Firefox */
                    -webkit-transform:rotate(45deg); /* Safari 和 Chrome */
                    -o-transform:rotate(45deg); 	/* Opera */">
                  <span style="position: absolute;right: 14px;top: 21px;font-size: 13px;
                    transform:rotate(45deg);
                    -ms-transform:rotate(45deg); 	/* IE 9 */
                    -moz-transform:rotate(45deg); 	/* Firefox */
                    -webkit-transform:rotate(45deg); /* Safari 和 Chrome */
                    -o-transform:rotate(45deg); 	/* Opera */">
                    <i class="anticon anticon-close"></i>
                  </span>
                </div>
              </a>
            </nz-popconfirm>

          </div>

        </div>
        <div (click)="removescs()" style="width: 80px;margin: auto;margin-top: 30px;">
          <button style="width: 80px;" nz-button nzType="danger">完成</button>
        </div>
        <!-- <nz-modal [(nzVisible)]="isVisibleyc" nzTitle="移除" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOkyc('success')">
          <p>确定要移除{{name}}吗？</p>
        </nz-modal> -->
      </div>
    </div>
  </section>
</nz-spin>
